#ifndef _LOADINGCLIENTCOLLECTION_
#define _LOADINGCLIENTCOLLECTION_

#include "SFML/Network.hpp"

/** 
* A collection of clients that have requested connection to the server and approved.
* These clients have not yet been added to the game.
*/
class LoadingClientCollection{

public:
	/** 
	* A linked list node of loading clients.
	*/
	struct LoadingClientNode{

        /** Client's Ip Address */
        sf::IpAddress* address;

        unsigned short port;
		sf::Clock* timeout;
		LoadingClientNode* next;
		LoadingClientNode* prev;
	};

private:

	/** 
	* The client count
	*/
	int clientCount;
public:
	
    static LoadingClientCollection* instance;

	/** 
	* The client list top node.
	*/
	LoadingClientNode* clientList;

    LoadingClientCollection();
    
	void addClient(const sf::IpAddress& client, const unsigned short port);
	void removeClient(LoadingClientNode* client);

    int getClientCount();
};

#endif